<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ChatLayoutDelegate Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Protocol/ChatLayoutDelegate" class="dashAnchor"></a>

    <a title="ChatLayoutDelegate Protocol Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          ChatLayout 2.0.5 Docs
        </a>
         (100% documented)
      </p>
    
      <div class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </div>
    
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">ChatLayout Reference</a>
      <img class="carat" src="../img/carat.png" alt=""/>
      ChatLayoutDelegate Protocol Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Core.html">Core</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ChatLayoutDelegate.html">ChatLayoutDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ChatLayoutAttributes.html">ChatLayoutAttributes</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutSettings.html">ChatLayoutSettings</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutPositionSnapshot/Edge.html">– Edge</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ChatLayoutInvalidationContext.html">ChatLayoutInvalidationContext</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemKind.html">ItemKind</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemSize.html">ItemSize</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemSize/CaseType.html">– CaseType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ChatItemAlignment.html">ChatItemAlignment</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/InitialAttributesRequestType.html">InitialAttributesRequestType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Extras.html">Extras</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ContainerCollectionViewCell.html">ContainerCollectionViewCell</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ContainerCollectionViewCellDelegate.html">ContainerCollectionViewCellDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ContainerCollectionReusableView.html">ContainerCollectionReusableView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/MessageContainerView.html">MessageContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CellLayoutContainerView.html">CellLayoutContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/CellLayoutContainerViewAlignment.html">CellLayoutContainerViewAlignment</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/EdgeAligningView.html">EdgeAligningView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/EdgeAligningView/Edge.html">– Edge</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView.html">SwappingContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView/Axis.html">– Axis</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView/Distribution.html">– Distribution</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ImageMaskedView.html">ImageMaskedView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageMaskedViewTransformation.html">ImageMaskedViewTransformation</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/RoundedCornersContainerView.html">RoundedCornersContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/StaticViewFactory.html">StaticViewFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/VoidViewFactory.html">VoidViewFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/VoidViewFactory.html#/s:10ChatLayout15VoidViewFactoryV0cD0C">– VoidView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Guides.html">Other Guides</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../readme.html">README</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>ChatLayoutDelegate</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ChatLayoutDelegate</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>

                </div>
              </div>
            <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> delegate</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP19shouldPresentHeader_2atSbAA014CollectionViewaB0C_SitF"></a>
                    <a name="//apple_ref/swift/Method/shouldPresentHeader(_:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP19shouldPresentHeader_2atSbAA014CollectionViewaB0C_SitF">shouldPresentHeader(_:<wbr>at:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> will call this method to ask if it should present the header in the current layout.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>false</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">shouldPresentHeader</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                         <span class="n">at</span> <span class="nv">sectionIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>chatLayout</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> reference.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>sectionIndex</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Index of the section.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code>Bool</code>.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP19shouldPresentFooter_2atSbAA014CollectionViewaB0C_SitF"></a>
                    <a name="//apple_ref/swift/Method/shouldPresentFooter(_:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP19shouldPresentFooter_2atSbAA014CollectionViewaB0C_SitF">shouldPresentFooter(_:<wbr>at:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> will call this method to ask if it should present the footer in the current layout.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>false</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">shouldPresentFooter</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                         <span class="n">at</span> <span class="nv">sectionIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>chatLayout</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> reference.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>sectionIndex</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Index of the section.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code>Bool</code>.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP11sizeForItem_2of2atAA0F4SizeOAA014CollectionViewaB0C_AA0F4KindO10Foundation9IndexPathVtF"></a>
                    <a name="//apple_ref/swift/Method/sizeForItem(_:of:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP11sizeForItem_2of2atAA0F4SizeOAA014CollectionViewaB0C_AA0F4KindO10Foundation9IndexPathVtF">sizeForItem(_:<wbr>of:<wbr>at:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> will call this method to ask what size the item should have.</p>

<p><strong>NB:</strong></p>

<p>If you are trying to speed up the layout process by returning exact item sizes in this method -
do not forget to change <code>UICollectionReusableView.preferredLayoutAttributesFitting(...)</code> method and do not
call <code>super.preferredLayoutAttributesFitting(...)</code> there as it will measure the <code>UIView</code>
using Autolayout Engine anyway.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>ItemSize.auto</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sizeForItem</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                 <span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/ItemKind.html">ItemKind</a></span><span class="p">,</span>
                 <span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/ItemSize.html">ItemSize</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>chatLayout</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> reference.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>kind</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Type of element represented by <code><a href="../Enums/ItemKind.html">ItemKind</a></code>.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>indexPath</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Index path of the item.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code><a href="../Enums/ItemSize.html">ItemSize</a></code>.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP16alignmentForItem_2of2atAA0aF9AlignmentOAA014CollectionViewaB0C_AA0F4KindO10Foundation9IndexPathVtF"></a>
                    <a name="//apple_ref/swift/Method/alignmentForItem(_:of:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP16alignmentForItem_2of2atAA0aF9AlignmentOAA014CollectionViewaB0C_AA0F4KindO10Foundation9IndexPathVtF">alignmentForItem(_:<wbr>of:<wbr>at:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> will call this method to ask what type of alignment the item should have.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>ChatItemAlignment.fullWidth</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">alignmentForItem</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                      <span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/ItemKind.html">ItemKind</a></span><span class="p">,</span>
                      <span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Enums/ChatItemAlignment.html">ChatItemAlignment</a></span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>chatLayout</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></code> reference.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>kind</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Type of element represented by <code><a href="../Enums/ItemKind.html">ItemKind</a></code>.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>indexPath</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Index path of the item.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code><a href="../Enums/ChatItemAlignment.html">ChatItemAlignment</a></code>.</p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP07initialB25AttributesForInsertedItem_2of2at9modifying2onyAA014CollectionViewaB0C_AA0H4KindO10Foundation9IndexPathVAA0abE0CAA07InitialE11RequestTypeOtF"></a>
                    <a name="//apple_ref/swift/Method/initialLayoutAttributesForInsertedItem(_:of:at:modifying:on:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP07initialB25AttributesForInsertedItem_2of2at9modifying2onyAA014CollectionViewaB0C_AA0H4KindO10Foundation9IndexPathVAA0abE0CAA07InitialE11RequestTypeOtF">initialLayoutAttributesForInsertedItem(_:<wbr>of:<wbr>at:<wbr>modifying:<wbr>on:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Asks the delegate to modify a layout attributes instance so that it represents the initial visual state of an item
  being inserted.</p>

<p>The <code>originalAttributes</code> instance is a reference type, and therefore can be modified directly.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation sets a <code>ChatLayoutAttributes.alpha</code> to zero.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">initialLayoutAttributesForInsertedItem</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                                            <span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/ItemKind.html">ItemKind</a></span><span class="p">,</span>
                                            <span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">,</span>
                                            <span class="n">modifying</span> <span class="nv">originalAttributes</span><span class="p">:</span> <span class="kt"><a href="../Classes/ChatLayoutAttributes.html">ChatLayoutAttributes</a></span><span class="p">,</span>
                                            <span class="n">on</span> <span class="nv">state</span><span class="p">:</span> <span class="kt"><a href="../Enums/InitialAttributesRequestType.html">InitialAttributesRequestType</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP05finalB24AttributesForDeletedItem_2of2at9modifyingyAA014CollectionViewaB0C_AA0H4KindO10Foundation9IndexPathVAA0abE0CtF"></a>
                    <a name="//apple_ref/swift/Method/finalLayoutAttributesForDeletedItem(_:of:at:modifying:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP05finalB24AttributesForDeletedItem_2of2at9modifyingyAA014CollectionViewaB0C_AA0H4KindO10Foundation9IndexPathVAA0abE0CtF">finalLayoutAttributesForDeletedItem(_:<wbr>of:<wbr>at:<wbr>modifying:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Asks the delegate to modify a layout attributes instance so that it represents the final visual state of an item
  being removed via <code>UICollectionView.deleteSections(_:)</code>.</p>

<p>The <code>originalAttributes</code> instance is a reference type, and therefore can be modified directly.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation sets a <code>ChatLayoutAttributes.alpha</code> to zero.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">finalLayoutAttributesForDeletedItem</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                                         <span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/ItemKind.html">ItemKind</a></span><span class="p">,</span>
                                         <span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">,</span>
                                         <span class="n">modifying</span> <span class="nv">originalAttributes</span><span class="p">:</span> <span class="kt"><a href="../Classes/ChatLayoutAttributes.html">ChatLayoutAttributes</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP16interItemSpacing_2of5after14CoreFoundation7CGFloatVSgAA014CollectionViewaB0C_AA0E4KindO0J09IndexPathVtF"></a>
                    <a name="//apple_ref/swift/Method/interItemSpacing(_:of:after:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP16interItemSpacing_2of5after14CoreFoundation7CGFloatVSgAA014CollectionViewaB0C_AA0E4KindO0J09IndexPathVtF">interItemSpacing(_:<wbr>of:<wbr>after:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the interval between items. If returns <code>nil</code> - the value from <code><a href="../Structs/ChatLayoutSettings.html">ChatLayoutSettings</a></code> will be used.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>nil</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">interItemSpacing</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                      <span class="n">of</span> <span class="nv">kind</span><span class="p">:</span> <span class="kt"><a href="../Enums/ItemKind.html">ItemKind</a></span><span class="p">,</span>
                      <span class="n">after</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">CGFloat</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout0aB8DelegateP19interSectionSpacing_5after14CoreFoundation7CGFloatVSgAA014CollectionViewaB0C_SitF"></a>
                    <a name="//apple_ref/swift/Method/interSectionSpacing(_:after:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout0aB8DelegateP19interSectionSpacing_5after14CoreFoundation7CGFloatVSgAA014CollectionViewaB0C_SitF">interSectionSpacing(_:<wbr>after:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Default implementation
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the interval between sections. If returns <code>nil</code> - the value from <code><a href="../Structs/ChatLayoutSettings.html">ChatLayoutSettings</a></code> will be used.</p>

                      </div>
                      <h4>Default Implementation</h4>
                      <div class="default_impl abstract">
                        <p>Default implementation returns: <code>nil</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">interSectionSpacing</span><span class="p">(</span><span class="n">_</span> <span class="nv">chatLayout</span><span class="p">:</span> <span class="kt"><a href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a></span><span class="p">,</span>
                         <span class="n">after</span> <span class="nv">sectionIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">CGFloat</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2024 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2024-04-30)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
    </section>
  </body>
</html>
